Repository navigation
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…d worker check-deployment.sh now matches the release prefix, so a rollback to a pre-copy release still passes, and clears the response body before each request. The app-worker upgrade fixture serves the worker at /sw.js like the deployment does. Keep sw.js in its original apply-update.php slot and update comments that still described the loader.
|
@erseco thank you for sending this patch. It was a good workaround, and I was about to merge it when I received notice that the issue should be resolved now. Is Playground loading for you? |
|
Hi @brandonpayton yes, is working right now! I suppose you can discard this PR :) |
Yeah, I think I will go ahead and close it. Thank you again for the PR. It was timely and a good idea. |
Addresses the clean-profile Chrome failure in #4625. Thanks to @rafark for the HAR. The old cached bridge asset failure is tracked separately in #4648.
Chrome receives the root worker successfully. Loading it makes a second request for the same release’s worker module. The shared HAR records HTTP 403 with a text/html response for that import. In a fresh headed Chrome 157.0.8103.79 profile I reproduced the registration failure on the public homepage. Headless Chrome on the same machine loaded both modules and booted WordPress. The hosting rule responsible for the response is still unknown.
The installer now copies the compiled worker to the existing root registration URL on both hosts, so registration needs no second module request. The worker has no relative imports and uses absolute
/releases/<id>/asset URLs, so serving the same bytes at/sw.jskeeps itsself.locationchecks, cache names andtype: 'module'registration unchanged. Release assets retain their versioned URLs. Installation and rollback use the existing root-file inventory.check-deployment.shwaits until/sw.jsnames the active release prefix. Both the copied worker and the older import loader match, so a rollback to a release installed before this change still passes the check. Rolling back to such a release restores the loader and with it the Chrome failure.Verification
test-router.mjs) failed before the fix (root contained the import) and passes after it, including backup and rollback.check-deployment.shagainst a local server with three/sw.jslayouts: copied worker and old loader pass; another release's worker fails after the wait.wait-for-edgespec, PHP and shell syntax checks pass./sw.js; it needs the builtwebsite-preview, so it runs in CI.This changes the worker delivery path only. The exact edge rule and behavior after a production deployment have not been verified.
Summary by CodeRabbit
/sw.jsnow serves the active release’s service worker directly instead of loading a separate release worker.